$.ajaxPrefilter(options => {
  // 1.统一配置根地址
  options.url = `http://124.223.14.236:8060/admin${options.url.includes('/upload?type=images') ? '/common' : ''}` + options.url
  // 2. 统一配置携带token
  if (options.url.includes('/index/login') || options.url.includes('/index/getConfig')) return
  const yddToken = localStorage.getItem('token')
  yddToken ? options.headers = {
    'x-token': yddToken
  } : location.href = './login.html'

  // 3. 统一处理错误
  // options.complete = ({ responseJSON: { errmsg, errno } }) => {
  // 	if (errmsg === '登陆验证失败，请重新登陆！' && errno === 9997) location.href = './login.html'
  // }
})